<!DOCTYPE html>



  


<html class="theme-next muse use-motion" lang="en">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  
    
      
    

    
  

  

  
    
    
    <link href="https://fonts.loli.net/css?family=Lato:300,300italic,400,400italic,700,700italic|Lobster:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon.ico?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon.ico?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.ico?v=5.1.4">


  <link rel="mask-icon" href="/images/favicon.ico?v=5.1.4" color="#222">


  <link rel="manifest" href="/images/manifest.json">




  <meta name="keywords" content="zhangyi, machine-learning, nlp, girls-in-ai" />










<meta name="description" content="这个页面就称为list系列吧，每个List系列也不一定是100个，放一些想做的事，想看的书等等。 Dare ListThings I want to do before I die. Please let me know if you have any recommendation or you want to join me!这个list的作用，让自己做回那个敢想敢做的自己，跳入自己的正循环。">
<meta property="og:type" content="website">
<meta property="og:title" content="Zhang Yi">
<meta property="og:url" content="http://codewithzhangyi.com/list-100/index.html">
<meta property="og:site_name" content="Zhang Yi">
<meta property="og:description" content="这个页面就称为list系列吧，每个List系列也不一定是100个，放一些想做的事，想看的书等等。 Dare ListThings I want to do before I die. Please let me know if you have any recommendation or you want to join me!这个list的作用，让自己做回那个敢想敢做的自己，跳入自己的正循环。">
<meta property="og:locale" content="en">
<meta property="og:updated_time" content="2020-04-21T07:27:25.441Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Zhang Yi">
<meta name="twitter:description" content="这个页面就称为list系列吧，每个List系列也不一定是100个，放一些想做的事，想看的书等等。 Dare ListThings I want to do before I die. Please let me know if you have any recommendation or you want to join me!这个list的作用，让自己做回那个敢想敢做的自己，跳入自己的正循环。">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://codewithzhangyi.com/list-100/"/>






<script data-ad-client="ca-pub-2691877571661707" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  <title> | Zhang Yi</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="en">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Zhang Yi</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle" style="color:#fff">
    <button>MENU</button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
            About
          </a>
        </li>
      
        
        <li class="menu-item menu-item-projects">
          <a href="/projects/" rel="section">
            
            Projects
          </a>
        </li>
      
        
        <li class="menu-item menu-item-blog">
          <a href="/blog/" rel="section">
            
            Blog
          </a>
        </li>
      
        
        <li class="menu-item menu-item-activity">
          <a href="/activity/" rel="section">
            
            Activity
          </a>
        </li>
      
        
        <li class="menu-item menu-item-list-100">
          <a href="/list-100/" rel="section">
            
            List 100
          </a>
        </li>
      
        
        <li class="menu-item menu-item-friends">
          <a href="/friends/" rel="section">
            
            Friends
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
            Search
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off"
             placeholder="Searching..." spellcheck="false"
             type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>


 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    
    
    
    <div class="post-block page">
      <header class="post-header">

	<h1 class="post-title" itemprop="name headline"></h1>



</header>

      
      
      
      <div class="post-body">
        
        
          <p>这个页面就称为list系列吧，每个List系列也不一定是100个，放一些想做的事，想看的书等等。</p>
<p><left><font size="10"><b>Dare List</b></font></left><br>Things I want to do before I die. Please let me know if you have any recommendation or you want to join me!<br>这个list的作用，让自己做回那个敢想敢做的自己，跳入自己的正循环。</p>
<ol>
<li>✓ Learn Yoga 学习瑜伽🧘‍</li>
<li>✓ Keep fit 保持健康</li>
<li>✓ Have tattoo 拥有一个纹身💘</li>
<li>✓ Learn coding 学习编程⌨</li>
<li>✓ Build own website 搭建自己的个人网站💻</li>
<li>✓ Teach courses 授课，传播知识📚</li>
<li>✓ <a href="https://www.girlsinai.com" target="_blank" rel="noopener">Start an nonprofit organization</a>  创立一个非盈利组织🏳‍🌈</li>
<li>✓ Be an AI algorithm engineer 成为一名AI算法工程师</li>
<li>✓ Get a patent 发表专利📃</li>
<li>✓ First woman in an office/table/group 在一个地方成功打破男性主导地位的规则👠</li>
<li>✓ More than 1k star repo in GitHub 创建github上有收藏破千的项目⭐</li>
<li>✓ Surfing on oceans 冲浪🏄‍</li>
<li>✓ Take a walk in the rain 雨中散步🌧</li>
<li>✓ Ask a stranger out 与陌生人约会🎯</li>
<li>✓ Sleep outside on the beach, under the sky 在海滩边星空下打盹🌠</li>
<li>✓ Learn to jazz 学跳爵士👗</li>
<li>✓ Drink Mojito made by self 喝自己调的酒mojito🍸</li>
<li>✓ Drink with hot strange guys 与陌生帅哥一起做酒鬼🥂</li>
<li>✓ Do something meaningless but drive by curiosity 做些看起来没意义但是很好奇的事😎</li>
<li>✓ Get over dark time once 成功度过一次人生黑暗时光☄</li>
<li>✓ IDGAF for what people say 不在乎别人的看法</li>
<li>✓ Build my own home 打造自己的家🏡</li>
<li>✓ Inspire people, inspire self 鼓励他人，激励自己</li>
<li>✓ Participate in marathon 参加一次马拉松</li>
<li>✓ Deep talk whole night 拥有一次彻夜长谈</li>
<li>✓ Be aware of emotional damage 意识到情绪化带来的破坏</li>
<li>✓ Find inner peace 找到过内心平衡，尽管总是会被打破，但仍不断练习</li>
<li>✓ Fall in love 爱一个人</li>
<li>✓ Start a company 创立一家公司</li>
<li>✓ Write code for human 自己写的程序被使用</li>
<li>✓ Write a blog 写博客</li>
<li>✓ More than 50,000 followers 有超过5万个读者（微博）</li>
<li>✓ Won medals 获得比赛奖牌</li>
<li>✓ Own options 拥有一个公司的期权</li>
<li>✓ Become a shareholder 成为一名股东</li>
<li>✓ Graduate from Hong Kong 从香港硕士毕业</li>
<li>✓ Fight in the most developed city 到中国最发达的科技城市奋斗自己的未来</li>
<li>✓ Get published on somewhere famous 在出名的地方出版/发布自己的文章📝</li>
<li>✓ Have business 做生意</li>
<li>✓ Play songs by guitar 学会弹吉他曲子</li>
<li>✗ Scream in a concert (Taylor Swift’s) 在喜欢的演唱会尽情欢呼</li>
<li>✗ Ride a horse in Mongolia 去蒙古骑马🏇</li>
<li>✗ Eat at a Michelin 3-star restaurant 在米其林三星水平的餐厅进餐</li>
<li>✗ Have million-level business做百万级生意</li>
<li>✗ Go on an African safari 一趟非洲动物之旅</li>
<li>✗ Camp in a desert 在沙漠驻扎</li>
<li>✗ See auroras 看极光</li>
<li>✗ Zero gravity 零重力体验</li>
<li>✗ Play in a casino 在赌场玩</li>
<li>✗ Do pull-up 做成一次引体向上</li>
<li>✗ Hitchhike across Africa 搭便车穿越非洲</li>
<li>✗ Have amazing sushi in Japan 在日本吃美好的寿司🍣</li>
<li>✗ Travel around Eastern Europe 周游东欧</li>
<li>✗ Visit Sicily 游玩西西里</li>
<li>✗ Go to South Pole or North Pole 去南极或北极</li>
<li>✗ Climb Great Pyramid of Giza, Egypt 去埃及看金字塔</li>
<li>✗ Climb Great wall, China 爬长城</li>
<li>✗ Hike to Everest base camp 涉足珠穆朗玛峰</li>
<li>✗ Carnival in Brazil 巴西狂欢节</li>
<li>✗ Christmas in New York 在纽约度过一个圣诞节</li>
<li>✗ Visit Googleplex 参观谷歌总部</li>
<li>✗ Speak at TED 在TED上演讲</li>
<li>✗ Meet Sheryl Sandberg 见到Sheryl Sandberg</li>
<li>✗ Meet Karlie Kloss 见到Karlie Kloss</li>
<li>✗ Invest on a company 投资一家公司</li>
<li>✗ Start my vlog 开始拍摄vlog</li>
<li>✗ Read Churchill 读丘吉尔</li>
<li>✗ Be a freelance 成为自由职业者</li>
<li>✗ Explore Amazon Jungle 探险亚马逊丛林</li>
<li>✗ Output everyday activity 在一段时间内每天输出固定内容 </li>
<li>✗ Work/Live in another country 在另外一个国家生活/工作一段时间</li>
<li>✗ Dance like nobody watching 肆意纵情舞动身体</li>
<li>✗ Dye the hair in a crazy color 把头发染成夸张的颜色</li>
<li>✗ Fly an airplane 开飞机</li>
<li>✗ Learn to ski 滑雪🏂</li>
<li>✗ See a psychiatrist 看一次心理医生</li>
<li>✗ Be in a movie/ad/commercial 拍摄一段商业影片</li>
<li>✗ Become the author of a book 写一本书</li>
<li>✗ Read 1000 books 读1000本书，从2020年开始算起（10/1000）</li>
<li>✗ Have a salad from my own garden 从自己的果园中做出一份沙拉</li>
<li>✗ Live in a strange but beautiful island for months 在陌生美丽的小岛上生活一阵子</li>
<li>✗ Take a hot-air balloon ride 一趟热气球飞行</li>
<li>✗ Go scuba diving 潜水 </li>
</ol>
<p><left><font size="10"><b>Book List</b></font></left><br>这个list记录我已经读完的书和想读的书，从2020年开始算起。读完的顺便评星级，如果是非常好的书籍，会计划写读后感。<br>如果下面的书单引起你的兴趣想做探讨或者想推荐书单，欢迎告诉我！</p>
<ol>
<li>✓《原则》 瑞达利欧 ⭐⭐⭐⭐⭐ </li>
<li>✗《沉思录》 马可奥勒留</li>
<li>✓《向前一步》 Sheryl Sandberg ⭐⭐⭐⭐</li>
<li>✓《穷爸爸富爸爸》 罗伯特清崎 ⭐⭐⭐⭐</li>
<li>✗《人类简史》 尤瓦尔赫拉利</li>
<li>✓《人类群星闪耀时》 斯蒂芬茨威格 ⭐⭐⭐⭐</li>
<li>✓《巴菲特致股东的信》⭐⭐⭐⭐</li>
<li>✓《商业的本质》⭐⭐</li>
<li>✓《规模》⭐⭐⭐⭐</li>
<li>✓《富兰克林自传》⭐⭐⭐⭐⭐</li>
<li>✗《论个人在历史上的作用问题》</li>
<li>✗《苏世民：我的经营与教训》</li>
<li>✗《进化论》 达尔文</li>
<li>✗《基业长青》</li>
<li>✗《思考：快与慢》</li>
<li>✗《影响力》</li>
<li>✗《自私的基因》</li>
<li>✗《聪明的投资者》</li>
<li>✗《尼采：在世纪的转折点上》</li>
<li>✗《从0到1开启商业与未来的秘密》</li>
<li>✗《金字塔原理》</li>
<li>✗《非暴力沟通》</li>
<li>✗《黑天鹅》</li>
<li>✗《狭义与广义相对论》</li>
<li>✗《别闹了，费曼先生》</li>
<li>✗《态度改变与社会影响》</li>
<li>✓《你当像鸟飞往你的山》⭐⭐⭐⭐</li>
<li>✗《至暗时刻：力挽狂澜的丘吉尔》</li>
<li>✗《资本论》</li>
<li>✓《我的天才女友》⭐⭐⭐⭐</li>
<li>✓《穷查理宝典》⭐⭐⭐⭐⭐</li>
</ol>
<p><left><font size="10"><b>Solo List</b></font></left><br>那些想要一个人做的事情，暂时还没有什么想法，放一放。</p>

        
      </div>
      
      
      
    </div>
    
    
    
  </div>


          </div>
          


          

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display:block; text-align:center;"
     data-ad-layout="in-article"
     data-ad-format="fluid"
     data-ad-client="ca-pub-2691877571661707"
     data-ad-slot="1301633292"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>

  
    <div class="comments" id="comments">
      <div id="disqus_thread">
        <noscript>
          Please enable JavaScript to view the
          <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
        </noscript>
      </div>
    </div>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/avatar.jpg"
                alt="ZhangYi" />
            
              <p class="site-author-name" itemprop="name">ZhangYi</p>
              <p class="site-description motion-element" itemprop="description">花时间做那些别人看不见的事~！</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives">
              
                  <span class="site-state-item-count">42</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                
                  <span class="site-state-item-count">1</span>
                  <span class="site-state-item-name">categories</span>
                
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">80</span>
                  <span class="site-state-item-name">tags</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/YZHANG1270" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i></a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:YZHANG1270@gmail.com" target="_blank" title="邮箱">
                      
                        <i class="fa fa-fw fa-envelope"></i></a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://weibo.com/p/1005053340707810?is_all=1" target="_blank" title="微博">
                      
                        <i class="fa fa-fw fa-weibo"></i></a>
                  </span>
                
            </div>
          

          
          

          
          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2018 &mdash; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">ZhangYi</span>

  
</div>








  <div class="footer-custom">All content under <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/">CC BY-NC-ND 4.0</a></div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      visitors
    </span>
  

  
    <span class="site-pv">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      
    </span>
  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
          <span id="scrollpercent"><span>0</span>%</span>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>


  


  
  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  

    
      <script id="dsq-count-scr" src="https://codewithzhangyi.disqus.com/count.js" async></script>
    

    
      <script type="text/javascript">
        var disqus_config = function () {
          this.page.url = 'http://codewithzhangyi.com/list-100/index.html';
          this.page.identifier = 'list-100/index.html';
          this.page.title = '';
        };
        var d = document, s = d.createElement('script');
        s.src = 'https://codewithzhangyi.disqus.com/embed.js';
        s.setAttribute('data-timestamp', '' + +new Date());
        (d.head || d.body).appendChild(s);
      </script>
    

  




	





  














  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  

  
  

  
  


  

  

</body>
</html>
